<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      th:replace="fragments/layout(title='巡检记录-添加',jsPaths='/static/js/devices/checkdevice/add.js ')">
<div class="right" th:fragment="right">
    <!--面包屑-->
    <div class="breadcrumb layui-bg-gray">
                <span class="layui-breadcrumb" lay-separator=">">
                    <a th:href="@{/}">首页</a>
                    <a href="/devices">设备管理</a>
                    <a href="/checkDevice">巡检记录</a>
                    <a><cite>新增</cite></a>
                </span>
    </div>

    <!--主体内容区-->
    <div class="form-content layui-container">
        <form class="layui-form" th:action="@{/checkDevice/save}" method="post">
            <div class="layui-form-item">
                <label class="layui-form-label must">设备</label>
                <div class="layui-input-block">
                    <select name="checkDeviceId" lay-filter="aihao" lay-verify="required">
                        <option value="">请选择设备</option>
                        <option th:each="devicesList: ${devicesList}"  th:value="${devicesList.id}"
                                th:text="${devicesList.name}"></option>
                    </select>
                </div>
            </div>

            <div class="layui-form-item ">
                <label class="layui-form-label must">检查结果</label>
                <div class="layui-input-block">
                    <input type="text" maxlength="300" name="checkResult" placeholder="请输入检查结果" autocomplete="off"
                           class="layui-input"  lay-verify="required">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-row">
                    <label class="layui-form-label must">上传巡检照片</label>
                    <div class="layui-input-block">
                        <div class="layui-upload">
                            <div class="layui-upload-list">
                                <img class="layui-upload-img" src="/static/imgs/imgup.png" id="img1">
                                <input type="hidden" maxlength="500" name="checkImg" class="hiddenIpt" lay-verify="required">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn  layui-btn-normal" lay-submit lay-filter="submitBtn">保存</button>
                        <a href="/checkDevice" class="layui-btn layui-btn-primary">返回</a>
                    </div>
                </div>
            </div>
        </form>
    </div>

</div>
</html>